
:: set necessary path
@echo off
set ANT_HOME=C:\Development\ant182
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_23
rem set PATH=%JAVA_HOME%;%ANT_HOME%\bin;%ANT_HOME%\libs;
set MAIN_CLASS=SkeletonAppDesktop

set MAIN_DIR=%cd%
set XEDITHOR_DIR=%MAIN_DIR%\xtools\xedithor

:: create some shortcut
	echo ..start buiilding..
	echo ..copying interface data..
    xcopy %MAIN_DIR%\data\*.java %MAIN_DIR%\src /S /Q /Y
	echo ..done
	echo .
    if "%1"=="data" (
		echo .. start make data ..
		echo .. warning : ensure working dir and export dir is coorect
		echo .. configure it at %XEDITHOR_DIR%
		call %XEDITHOR_DIR%\xedithor.exe export
    ) else if "%1"=="debug" (
		echo .. start make debug ..
		call %ANT_HOME%\bin\ant

    ) else if "%1"=="release" (
		echo .. start make release ..
		call %ANT_HOME%\bin\ant

    ) else if "%1"=="run" (
		echo .. start make run ..
		call %ANT_HOME%\bin\ant %MAIN_CLASS%

    ) else if "%1"=="clean" (
		echo .. start make clean ..  
		call %ANT_HOME%\bin\ant cleanall
		
    ) else (
        echo usage             : make argument
        echo argument available:
        echo      data    : build all game resources
        echo      debug   : compile , debug version
        echo      release : compile , release version
        echo      clean   : clean all temporary dir output
    )